package com.wuf.mybatis.scripting.xmltags;

import com.wuf.mybatis.mapping.SqlSource;
import com.wuf.mybatis.scripting.LanguageDriver;
import com.wuf.mybatis.session.Configuration;
import org.dom4j.Element;

/**
 * @className: com.wuf.mybatis.scripting.xmltags.XMLLanguageDriver
 * @description: XML语言驱动器
 * @author: wuf
 * @create: 2024-05-14 15:04
 */
public class XMLLanguageDriver implements LanguageDriver {
    @Override
    public SqlSource createSqlSource(Configuration configuration, Element script, Class<?> parameterType) {
        // 用XML脚本构建器解析
        XMLScriptBuilder builder = new XMLScriptBuilder(configuration, script, parameterType);
        return builder.parseScriptNode();
    }


}
